package com.retail.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.retail.order.mapper.TTakeMapper;
import com.retail.order.domain.TTake;
import com.retail.order.service.ITTakeService;

/**
 * 收货Service业务层处理
 * 
 * @author retail
 * @date 2024-02-29
 */
@Service
public class TTakeServiceImpl implements ITTakeService 
{
    @Autowired
    private TTakeMapper tTakeMapper;

    /**
     * 查询收货
     * 
     * @param takeId 收货主键
     * @return 收货
     */
    @Override
    public TTake selectTTakeByTakeId(Long takeId)
    {
        return tTakeMapper.selectTTakeByTakeId(takeId);
    }

    /**
     * 查询收货列表
     * 
     * @param tTake 收货
     * @return 收货
     */
    @Override
    public List<TTake> selectTTakeList(TTake tTake)
    {
        return tTakeMapper.selectTTakeList(tTake);
    }

    /**
     * 新增收货
     * 
     * @param tTake 收货
     * @return 结果
     */
    @Override
    public int insertTTake(TTake tTake)
    {
        return tTakeMapper.insertTTake(tTake);
    }

    /**
     * 修改收货
     * 
     * @param tTake 收货
     * @return 结果
     */
    @Override
    public int updateTTake(TTake tTake)
    {
        return tTakeMapper.updateTTake(tTake);
    }

    /**
     * 批量删除收货
     * 
     * @param takeIds 需要删除的收货主键
     * @return 结果
     */
    @Override
    public int deleteTTakeByTakeIds(Long[] takeIds)
    {
        return tTakeMapper.deleteTTakeByTakeIds(takeIds);
    }

    /**
     * 删除收货信息
     * 
     * @param takeId 收货主键
     * @return 结果
     */
    @Override
    public int deleteTTakeByTakeId(Long takeId)
    {
        return tTakeMapper.deleteTTakeByTakeId(takeId);
    }

    @Override
    public List<TTake> getAddress(Long userId) {
        return tTakeMapper.getAddress(userId);
    }
}
